<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

	function anchor_popup($uri = '', $title = '', $attributes = FALSE)
	{
		$title = (string) $title;

		$site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri;

		if ($title == '')
		{
			$title = $site_url;
		}

		if (($attributes === FALSE) || ( ! is_array($attributes)))
		{
			$attributes = array();
		}

		foreach (array('width' => '750', 'height' => '500', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '200', 'screeny' => '100', ) as $key => $val)
		{
			$atts[$key] = ( ! isset($attributes[$key])) ? $val : $attributes[$key];
			unset($attributes[$key]);
		}

		if ($attributes != '')
		{
			$attributes = _parse_attributes($attributes);
		}

		return "<a href='javascript:void(0);' onclick=\"window.open('".$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\"$attributes>".$title."</a>";
	}

/* End of file MY_url_helper.php */
/* Location: ./system/application/helpers/MY_url_helper.php */